(function () {
  'use strict';

  angular.module('cf-content')

    .factory('Api',Api)


    Api.$inject=['$resource','serverUrl'];

    function Api($resource,serverUrl){
    	var API={},method='POST';


        /**
         * 登陆检测
         * /api/common/login_type/get
         */
        API['Logintype']=$resource(serverUrl+'api/common/login_type/get',{

        },
        {
            Check:{
               method:method
            }
        }

        );

        /**
         * 登录/api/admin/login
         * /api/admin/logout
         */
        API['Login']=$resource(serverUrl+'api/admin/:operate',{

        },
        {
            Post:{
                params:{operate:'login'},
                method:method
            },
            Out:{
                params:{operate:'logout'},
                method:method
            }
        }

        );


        return API;
    }
})();